package yanc.app

class Business {
    /*
    商户号
     */
    String id
    /*
    商户名称
     */
    String name
    /*
    活动名称
     */
    String title

    Date createDate

    Date modifyDate
    /*
    图片路径
     */
    String imgUrl
    /*
    状态
    */
    Boolean status

    /**
     * 跳转链接
     */
    String url
    static belongsTo = [comm: News]

    static mapping = {
        table "sys_business"
        version false
        id(column: "id", sqlType: "varchar(15)", generator: 'assigned')
        createDate(column: "create_date", sqlType: "datetime")
        modifyDate(column: "modify_date", sqlType: "datetime")
        imgUrl(column: "img_url", sqlType: "varchar(256)")
        name(column: "name", sqlType: "varchar(64)")
        status(column: "status", sqlType: "tinyint(1)")
        url(column: "url", sqlType: "varchar(1024)")
        title(column: "title", sqlType: "varchar(64)")
    }
    static constraints = {
        id(nullable: false, blank: false, unique: true)
        createDate(nullable: false, unique: false)
        modifyDate(nullable: true, unique: false)
        imgUrl(nullable: false, unique: false)
        name(nullable: false, unique: false)
        status(nullable: false, unique: false)
        url(nullable: false, unique: false)
        title(nullable: false, unique: false)
    }
}
